package kr.hkit.powerjava.chapter13.p;

import java.awt.HeadlessException;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

class PanelA extends JPanel{

	public PanelA() {
		JLabel label = new JLabel("자바 피자에 오신 것을 환영합니다. 피자의 종류를 선택하시오.");
		add(label);
	}
	
}

class PanelB extends JPanel{

	public PanelB() {
		
		
		JButton button1 = new JButton("콤보");
		JButton button2 = new JButton("포테이토");
		JButton button3 = new JButton("불고기");
		
		add(button1);
		add(button2);
		add(button3);
	}
	
}

public class MyFrame extends JFrame{

	public MyFrame() throws HeadlessException {
		init();
	}

	private void init() {
		setSize(600, 150);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setTitle("MyFrame");
		
		JPanel p = new JPanel();
		p.add(new PanelA());
		p.add(new PanelB());
		
		add(p);
		setVisible(true);
	}

}
